Skip to content

feat(docs): update layout and categorise the sidebar items#3762

Open
adithyaakrishna wants to merge 10 commits intosimstudioai:stagingfrom
adithyaakrishna:feat/docs
Open

feat(docs): update layout and categorise the sidebar items#3762
adithyaakrishna wants to merge 10 commits intosimstudioai:stagingfrom
adithyaakrishna:feat/docs

Conversation

@adithyaakrishna
Copy link
Copy Markdown
Contributor

Summary

  • Update the layout of docs and add missing content
  • Categorise the sidebar items

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: Layout and design update for docs

Testing

  • cd apps/docs && bun run dev
  • Check how the layout looks on the browser

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Before:

Screenshot 2026-03-25 at 10 13 43 PM

After:

Screenshot 2026-03-25 at 10 13 10 PM

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 25, 2026

PR Summary

Medium Risk
Mostly documentation/UI changes, but it adds runtime file-system lookups to resolve GitHub source links and new client-side fetching for Markdown copy, which could affect rendering/performance or non-Node runtimes.

Overview
Refreshes the docs UX: new typography (local Season + Martian Mono), updated navbar/search/theme controls, a new global DocsFooter, and significant sidebar/TOC styling + separator icons.

Adds richer page actions by switching LLMCopyButton to copy raw Markdown via markdownUrl, introducing an Open popover (ViewOptionsPopover) with links (Markdown, GitHub source, and AI tools), and resolving per-page GitHub source URLs via server-side content path detection.

Reorganizes the docs IA (categorized meta.json with section separators) and expands/updates content across languages, including new block pages (Memory, Note, Thinking, Webhook (outbound)), plus new docs like Mailer and Tables, and refreshed Copilot/model/integration-count text.

Written by Cursor Bugbot for commit 4ced3ad. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

@adithyaakrishna is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 25, 2026

Greptile Summary

This PR refreshes the Sim docs layout: it replaces Inter/Geist with Season + Martian Mono fonts, introduces a categorised sidebar with section icons and a neutral active-state palette, adds a ViewOptionsPopover that lets readers open a page in GitHub, copy its Markdown, or send it to various AI tools (ChatGPT, Claude, Cursor, Scira), and reorganises the sidebar navigation with translated section headings across all six locales.

Key changes:

  • layout.tsx: swaps Google fonts for a local Season woff2 + Martian Mono; removes AnimatedBlocks.
  • sidebar-components.tsx: refactors style constants; adds icon mapping for new section separators.
  • All meta.json files: adds translated section separators (Basics, Core Concepts, Integrations, Security & Configuration, Execution & Operations, Deployment, Reference) and adds missing mailer/tables entries to non-English locales.
  • page.tsx + components/ai/page-actions.tsx + components/page-actions.tsx: new ViewOptionsPopover and MarkdownCopyButton components; server-side resolveGitHubDocUrl resolves the source file on disk to produce a GitHub link.
  • global.css: font variable references updated and several sidebar/code/navbar CSS tweaks.

Issues found:

  • CONTENT_DOCS_DIR = join(process.cwd(), 'apps/docs/content/docs') will resolve to a non-existent path when Next.js runs from the apps/docs/ directory (the standard dev setup), causing the GitHub link to silently never appear in the popover.
  • The module-level fetch cache in MarkdownCopyButton permanently stores rejected promises; a single failed network request prevents copy from ever working again without a page reload.
  • global.css received extensive style edits, violating the project guideline to avoid this file in favour of component-local styles.
  • Two relative imports (../../lib/cn, '../icons') bypass the @/ path alias convention used everywhere else.

Confidence Score: 4/5

  • Safe to merge after fixing the CONTENT_DOCS_DIR path; the rest of the layout and categorisation changes are solid.
  • The docs layout refresh and sidebar categorisation work well. Two logic issues need attention: the wrong process.cwd() prefix silently breaks the GitHub link, and the fetch cache can trap rejected promises. Both are confined to the new ViewOptionsPopover feature and don't affect the primary docs reading experience. The style/import issues are minor. A one-line path fix and a cache-eviction guard would clear all P1 concerns.
  • apps/docs/app/[lang]/[[...slug]]/page.tsx (CONTENT_DOCS_DIR path), apps/docs/components/ai/page-actions.tsx (rejected-promise cache)

Important Files Changed

Filename Overview
apps/docs/app/[lang]/[[...slug]]/page.tsx Adds ViewOptionsPopover with GitHub/AI links; CONTENT_DOCS_DIR path likely wrong (doubles apps/docs prefix), silently breaking the GitHub link; minor indentation inconsistency on second popover block.
apps/docs/components/ai/page-actions.tsx New MarkdownCopyButton and ViewOptionsPopover components; module-level fetch cache permanently stores rejected promises, preventing retry after a failed network request.
apps/docs/app/global.css Extensive style updates (font references geist→season/martianMono, sidebar colors, hover/active states, code block styling); violates the guideline to avoid editing globals.css unless necessary.
apps/docs/components/ui/popover.tsx New Radix-based Popover wrapper; uses a relative ../../lib/cn import instead of the @/lib/cn path alias used project-wide.
apps/docs/components/navbar/navbar.tsx Adds Discord and Mothership CTA buttons, replaces "Mothership" nav tab with "Changelog"; uses a relative '../icons' import instead of @/components/icons.
apps/docs/app/[lang]/layout.tsx Switches fonts from Inter/Geist Mono to Season (local) / Martian Mono; removes AnimatedBlocks; correctly applies new font CSS variables to html and body.
apps/docs/components/docs-layout/sidebar-components.tsx Refactors sidebar item/folder styles to shared cn constants; adds per-section icons mapped from the new separator labels; neutral color palette replaces previous emerald accents.
apps/docs/content/docs/en/meta.json Adds labeled section separators (Basics, Core Concepts, Integrations, Security & Configuration, Execution & Operations, Deployment, Reference) and moves quick-reference to the Reference section.

Sequence Diagram

sequenceDiagram
    participant Browser
    participant PageTSX as page.tsx (Server)
    participant FS as Node.js fs
    participant Client as ViewOptionsPopover (Client)
    participant GitHub
    participant AI as AI Tools (ChatGPT / Claude / etc.)

    PageTSX->>PageTSX: resolveGitHubDocUrl(page.url)
    PageTSX->>FS: existsSync(CONTENT_DOCS_DIR/lang/slug.mdx)
    FS-->>PageTSX: true/false
    PageTSX->>PageTSX: build GitHub blob URL (or undefined)
    PageTSX->>Browser: render ViewOptionsPopover(markdownUrl, githubUrl)

    Browser->>Client: user clicks "Open ▾"
    Client->>Client: useMemo → build items list
    Client-->>Browser: show popover with links

    Browser->>GitHub: Open in GitHub (if githubUrl defined)
    Browser->>Client: user clicks "Copy Markdown"
    Client->>Client: check module-level cache
    Client->>PageTSX: fetch(markdownUrl) → raw .mdx text
    PageTSX-->>Client: MDX content
    Client->>Browser: clipboard.write(content)
Loading

Reviews (1): Last reviewed commit: "chore: update layout and contents" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant